<!-- OGN -->
<?php 
require_once ("config/web.init.php");
require_once ("config/web.config.php");
require_once ("base_init.php");
	
?>

<?php
$userLoggedIn = "USER_LOGGED_IN";
$userName = "";
if (Security::sessionExists("$userLoggedIn") ) {
	$userName = Security::getSession("$userLoggedIn");
} else if (Security::cookieExists("$userLoggedIn")) {
	$userName = Security::getCookie("$userLoggedIn");
} else {
	header("Location: index.php");
}

$pageTitle = "OGN: HomePage";
?>
<?php
 
$monthNames = Array("January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December");
 
if (!isset($_GET["m"])) $_GET["m"] = date("n");
if (!isset($_GET["y"])) $_GET["y"] = date("Y");
 
$currentMonth = $_GET["m"];
$currentYear = $_GET["y"];
 
$p_year = $currentYear;
$n_year = $currentYear;
$p_month = $currentMonth-1;
$n_month = $currentMonth+1;
 
if ($p_month == 0 ) {
    $p_month = 12;
    $p_year = $currentYear - 1;
}
 
if ($n_month == 13 ) {
    $n_month = 1;
    $n_year = $currentYear + 1;
}
$days=array('1'=>"S",'2'=>"M",'3'=>"T",'4'=>"W",'5'=>"T",'6'=>"F",'7'=>"S");
 
?>
<html>
<head>
<title><?php echo $pageTitle;?></title>

<link rel="stylesheet" type="text/css" href="css/homePage.css">
</head>
<body>

<!-- Main:Table -->
<table border='0' cellspacing='0' cellpadding='0' height='100%' width='100%' valign='center' align='center'>
<!-- Header -->
<tr>
	<td colspan='3' width='100%' align='top' height='4%' style="border-bottom:1pt solid green;">
	<table border='0' cellspacing='0' cellpadding='0' height='100%' width='100%' valign='center' align='center'>
		<tr>
			<td colspan='1' valign='top' align='left' width='60%' height='100%'>OGN</td>
			<td colspan='1' valign='top' align='right' width='40%' height='100%'>
				<table border='0' cellspacing='0' cellpadding='0' height='100%' width='100%' valign='center' align='right'>
				<tr>
					<td colspan='1' valign='top' align='right' width='100%' height='50%'>
					<?php echo $userName;?>&nbsp;&nbsp;
					&nbsp;
					Home
					&nbsp;
					<a href="profile.php">Profile</a>&nbsp;
					&nbsp;
					<a href="logout.php">Logout</a>&nbsp;
					</td>
				</tr>
				</table>
			</td>
		</tr>
	</table>
	</td>
</tr>
<tr>
	<td colspan='2' align='top' height='92%' width='70%'></td>
	<td colspan='1' valign='top' align='center' height='92%' style="border-left:1pt solid green;">
		<br/>
		<table class='border1' border='0' cellspacing='0' cellpadding='0' height='' width='98%' valign='top' align='center'>
			<tr class='border1'>
				<th  colspan='2' class='border1' align='left'>
				To Do List&nbsp;&nbsp;&nbsp;&nbsp;(<input type='checkbox'/>On click: move to 'Done')&nbsp;Show
				<select name='showTodo'>
					<option value='3'>3</option>
					<option value='5'>5</option>
					<option value='10'>10</option>
				</select>
				</th>
			</tr>
			<tr>
				<td colspan='1' align='left'  width='90%' class='border1'>&nbsp;Item</td>
				<td colspan='1' align='left'  class='border1'>&nbsp;Now</td>
			</tr>
			<tr>
				<td colspan='1' class='border1' ><input type='checkbox'/>&nbsp;Create Portfolio Page</td>
				<td colspan='1' align='left'  class='border1'>&nbsp;<input type='radio' name='todoNow'/></td>
			</tr>
			<tr>
				<td colspan='1' class='border1' ><input type='checkbox'/>&nbsp;Create Portfolio Page</td>
				<td colspan='1' align='left'  class='border1'>&nbsp;<input type='radio' name='todoNow'/></td>
			</tr>
			<tr>
				<td colspan='1' class='border1' ><input type='checkbox'/>&nbsp;Create Portfolio Page</td>
				<td colspan='1' align='left'  class='border1'>&nbsp;<input type='radio' name='todoNow'/></td>
			</tr>
			<tr>
				<td colspan='1' class='border1' ><input type='checkbox'/>&nbsp;Create Portfolio Page</td>
				<td colspan='1' align='left'  class='border1'>&nbsp;<input type='radio' name='todoNow'/></td>
			</tr>
			<tr>
				<td colspan='1' class='border1' ><input type='checkbox'/>&nbsp;Create Portfolio Page</td>
				<td colspan='1' align='left'  class='border1'>&nbsp;<input type='radio' name='todoNow'/></td>
			</tr>
			<tr>
				<td colspan='2' >
				<input type='text' name='todolistItem' placeholder='Enter a Todo Item'/>
				&nbsp;&nbsp;
				<select name='estDuration'>
					<option value='120'>2m</option>
					<option value='300'>5m</option>
					<option value='600'>10m</option>
					<option value='900'>15m</option>
					<option value='1200'>20m</option>
					<option value='1500'>25m</option>
				</select>
				<input type='submit' name='submit' value='Save ToDo'/>
				</td>
			</tr>
		</table>
		<br/>
		<table class='border1' border='0' cellspacing='0' cellpadding='0' height='' width='98%' valign='top' align='center'>
			<tr class='border1'>
				<?php
					$day = date("d");
					$mon = date("m");
					$yr = date("Y");
					$timestampWK = mktime(0,0,0,$mon,date("d"),$yr);
					$wkNo = date("W", $timestampWK);
					//print "$timestampWK, $currentMonth, $currentYear, $wkNo";
					$b = time();
					$getDT = date("g:i:s A l, F jS Y",$b); 
 ?> 
				<th  class='border1' align='left'>Calendar &nbsp; Wk<?php echo $wkNo?>::<?php echo $getDT?></th>
			</tr>
			<tr>
				<?php include_once("calendar.php");?>
			</tr>
			<tr>
				<td>&nbsp;</td>
			</tr>
		</table>
	</td>
</tr>
<tr>
	<td colspan='3' width='100%' align='bottom' height='4%'>
		<?php include_once("footer.php"); ?>
	</td>
</tr>
</table>

<!-- Main:Table -->
</body>
</html>